<template>
 <header>
    <router-link tag="div"
                 to="/search"
                 class="header__search">
      <i class="iconfont icon-sousuo1"></i>
    </router-link>
    <div class="header__site">
      <router-link tag="p" to="/city">
        <span>{{this.defaultCity}}</span>站
      </router-link>
    </div>
    <div class="login"><a href="#">登录</a></div>
 </header>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'IndexHeader',
  computed: {
    ...mapState({'defaultCity': 'city'})
  }
}
</script>

<style lang="scss" scoped>
@import '~@/assets/style/common';
  header {
    position: fixed;
    display: flex;
    width: 100%;
    justify-content: space-around;
    height: 92px;
    line-height: 92px;
    background: #3190e8;
    z-index: 2;
  }
  .header__search {
    .icon-sousuo1 {
      font-size: 48px;/*px*/
      color: #fff;
    }
  }
  .header__site {
    width: 50%;
    p {
      width: 100%;
      @include omit;
      font-size: 36px;
      color: #fff;
    }
    text-align: center;
  }
  .login {
    a {
      display: inline-block;
      height: 100%;
      font-size: 28px;
      color: #fff;
    }
  }
</style>
